Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle settings with missing shared section #505

Merged
merged 1 commit into from
Mar 5, 2024
Merged

fix: handle settings with missing shared section #505

merged 1 commit into from
Mar 5, 2024

Conversation

rycee
Copy link
Contributor

@rycee rycee commented Mar 4, 2024

Description

This allows configuration files without a shared field, using the default value if missing.

Before:

$ pueued -vv -c /dev/null
Error: Error while reading configuration.

Caused by:
    Error while reading configuration:
    missing field `shared`

After:

$ pueued -vv -c /dev/null
21:12:26 [INFO] Restoring state
21:12:26 [INFO] Using unix socket at: "/run/user/1000/pueue_rycee.socket"

Checklist

  • I think I picked the correct source and target branch.
  • I included a new entry to the CHANGELOG.md.
  • I checked cargo clippy and cargo fmt. The CI will fail otherwise anyway.
  • (If applicable) I added tests for this feature or adjusted existing tests.
  • (If applicable) I checked if anything in the wiki needs to be changed.

This allows configuration files without a `shared` field, using the
default value if missing.

Before:

    $ pueued -vv -c /dev/null
    Error: Error while reading configuration.

    Caused by:
        Error while reading configuration:
        missing field `shared`

After:

    $ pueued -vv -c /dev/null
    21:12:26 [INFO] Restoring state
    21:12:26 [INFO] Using unix socket at: "/run/user/1000/pueue_rycee.socket"
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.18%. Comparing base (be40e46) to head (c93ab16).

Additional details and impacted files
@@             Coverage Diff              @@
##           development     #505   +/-   ##
============================================
  Coverage        80.18%   80.18%           
============================================
  Files               77       77           
  Lines             5673     5673           
============================================
  Hits              4549     4549           
  Misses            1124     1124           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Nukesor
Copy link
Owner

Nukesor commented Mar 5, 2024

Thanks!

@Nukesor Nukesor merged commit 6fd3f7c into Nukesor:development Mar 5, 2024
18 checks passed
@rycee rycee deleted the handle-missing-shared branch March 5, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants